package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func postRequest(url string) string {
	client := &http.Client{}
	resp, err := http.NewRequest("GET", url, nil)
	if err != nil {
		panic(err)
	}
	var cookie string = "_ga=GA1.2.1846024533.1586490668; __gads=ID=6fc1c8374afda160:T=1586490669:S=ALNI_MbOcX-4dWjC0JBsEHUGwak52EB2aw; __yadk_uid=CwosxhwfQaxNlPA1tpOcfyTTWTJ0tVOh; remember_user_token=W1syNDM2NzUwOF0sIiQyYSQxMSRxdHFGRko0R1FPUlhaZ1VoeHZvekouIiwiMTYwNzQ3ODkyNy41NDU5OCJd--e0730c39adcc3598dc773c5d1409a0172d18a407; read_mode=day; default_font=font2; locale=zh-CN; _m7e_session_core=0b6017954a5d60e3dc230f33c5bc2110; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2224367508%22%2C%22%24device_id%22%3A%2216ea131a350768-08e6596798b7e3-2393f61-2073600-16ea131a351a98%22%2C%22props%22%3A%7B%22%24latest_referrer%22%3A%22%22%2C%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_utm_source%22%3A%22recommendation%22%2C%22%24latest_utm_medium%22%3A%22seo_notes%22%2C%22%24latest_utm_campaign%22%3A%22maleskine%22%2C%22%24latest_utm_content%22%3A%22note%22%7D%2C%22first_id%22%3A%2216ea131a350768-08e6596798b7e3-2393f61-2073600-16ea131a351a98%22%7D; Hm_lvt_0c0e9d9b1e7d617b3e6842e85b9fb068=1606966019,1606981020,1607217651,1607478931; Hm_lpvt_0c0e9d9b1e7d617b3e6842e85b9fb068=1607478931"
	resp.Header.Set("Cookie", cookie)
	res, err := client.Do(resp)
	if err != nil {
		fmt.Println("登录错误")
	}
	result, _ := ioutil.ReadAll(res.Body)
	defer res.Body.Close()
	println("resp:", res.Request)
	return string(result)
}

func main() {

	postRequest("https://www.jianshu.com/u/fff638c06ab6")
}
